package com.naton.common.utils.picture;

import android.content.Context;

import com.luck.picture.lib.config.PictureSelectionConfig;
import com.luck.picture.lib.config.SelectLimitType;
import com.luck.picture.lib.interfaces.OnSelectLimitTipsListener;
import com.luck.picture.lib.utils.ToastUtils;
import com.naton.common.R;

/**
 * @time: 2022/1/19
 * @author: lifuling
 * @version: v1.0
 * @file_desc: 自定义限制提示
 */
public class MeOnSelectLimitTipsListener implements OnSelectLimitTipsListener {

    @Override
    public boolean onSelectLimitTips(Context context, PictureSelectionConfig config, int limitType) {
        if (limitType == SelectLimitType.SELECT_MAX_VIDEO_SELECT_LIMIT) {
            ToastUtils.showToast(context, context.getString(R.string.ps_message_video_max_num, String.valueOf(config.maxVideoSelectNum)));
            return true;
        }
        return false;
    }
}